Efficient use of resources in message classification

ABSTRACT

A system and method are disclosed for routing a message through a plurality of test methods. The method includes: receiving a message; applying a first test method to the message; updating a state of the message based on the first test method; and determining a second test method to be applied to the message based on the state.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation and claims the priority benefit of U.S. patent application Ser. No. 13/658,777 filed Oct. 23, 2012, which is set to issue as U.S. Pat. No. 9,215,198 on Dec. 15, 2015, which is a continuation of and claims the priority benefit of U.S. patent application Ser. No. 13/080,638 filed Apr. 5, 2011, now U.S. Pat. No. 8,296,382 issued on Oct. 23, 2012, which is a continuation and claims the priority benefit of U.S. patent application Ser. No. 11/927,516 filed Oct. 29, 2007, now U.S. Pat. No. 7,921,204 issued on Apr. 5, 2011, which is a continuation and claims the priority benefit of U.S. patent application Ser. No. 10/422,359 filed Apr. 23, 2003, now U.S. Pat. No. 7,539,726 issued on May 26, 2009, which is a continuation-in-part and claims the priority benefit of U.S. patent application Ser. No. 10/197,393 filed Jul. 16, 2002, now U.S. Pat. No. 8,924,484 issued on Dec. 30, 2014, the disclosures of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to electronic messages. More specifically, a method and a system for avoiding spam messages are disclosed.

2. Description of the Related Art

Electronic messages have become an indispensable part of modern communication. Electronic messages such as email or instant messages are popular because they are fast, easy, and have essentially no incremental cost. Unfortunately, these advantages of electronic messages are also exploited by marketers who regularly send out unsolicited junk messages (also referred to as “spam”). Spam messages are a nuisance for users. They clog people's email box, waste system resources, often promote distasteful subjects, and sometimes sponsor outright scams.

There are many existing spam blocking systems that employ various techniques for identifying and filtering spam. For example, some systems generate a thumbprint (also referred to as signature) for each incoming message, and looks up the thumbprint in a database of thumbprints for known spam messages. If the thumbprint of the incoming message is found in the spam database, then the message is determined to be spam and is discarded.

Other techniques commonly used include whitelist, blacklist, statistical classifiers, rules, address verification, and challenge-response. The whitelist technique maintains a list of allowable sender addresses. The sender address of an incoming message is looked up in the whitelist; if a match is found, the message is automatically determined to be a legitimate non-spam message. The blacklist technique maintains a list of sender addresses that are not allowed and uses those addresses for blocking spam messages. The statistical classifier technique is capable of learning classification methods and parameters based on existing data. The rules technique performs a predefined set of rules on an incoming message, and determines whether the message is spam based on the outcome of the rules. The address verification technique determines whether the sender address is valid by sending an automatic reply to an incoming message and monitoring whether the reply bounces. A bounced reply indicates that the incoming message has an invalid sender address and is likely to be spam. The challenge-response technique sends a challenge message to an incoming message, and the message is delivered only if the sender sends a valid response to the challenge message.

Some of the existing systems apply multiple techniques sequentially to the same message in order to maximize the probability of finding spam. However, many of these techniques have significant overhead and can adversely affect system performance when applied indiscriminately. A technique may require a certain amount of system resources, for example, it may generate network traffic or require database connections. If such a technique were applied to all incoming messages, the demand on the network or database resources would be large and could slow down the overall system.

Also, indiscriminate application of these techniques may result in lower accuracy. For example, if a legitimate email message includes certain key spam words in its subject, the may be classified as spam if certain rules are applied. However, a more intelligent spam detection system would discover that the message is from a valid address using the address verification technique, thus allowing the message to be properly delivered. It would be useful to have a spam detection system that uses different spam blocking techniques more intelligently. It would be desirable for the system to utilize resources more efficiently and classify messages more accurately.

SUMMARY OF THE CLAIMED INVENTION

One exemplary method for routing a message through a plurality of test methods includes receiving a message at a network interface via a communication network. A first test method may be applied to the received message. Application of the first test method may result in an indeterminate classification of the received message. One or more next test methods may be selected from a plurality of next test methods until all next test methods have been selected or until a determinate classification of the received message results from application of a next test method. The one or more next test methods may be selected for application to the received message. A next test method more likely to result in a determinate classification may be selected over a next test method less likely to result in a determinate classification. The received message may be provided for delivery to a user when all next test methods have been selected for application to the received message and application of the next test methods results in an indeterminate classification of the received message.

An exemplary system for implementing the aforementioned method for routing a message through a plurality of test methods is also disclosed as is a software-medium for implementing the same.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be readily understood by the following detailed description in conjunction with the accompanying drawings, wherein like reference numerals designate like structural elements.

FIGS. 1A-1E are block diagrams illustrating the application of test methods to incoming messages.

FIG. 2 is a system diagram illustrating the operations of a system embodiment.

FIG. 3 is a diagram illustrating how a message state data structure is used in an embodiment.

FIG. 4 is a flowchart illustrating the processing of a message according to one embodiment.

FIG. 5 is a flowchart illustrating a test selection process according to one embodiment.

FIGS. 6A-6B illustrate a test selection process based on test results, according to one embodiment.

DETAILED DESCRIPTION

It should be appreciated that the present invention can be implemented in numerous ways, including as a process, an apparatus, a system, or a computer readable medium such as a computer readable storage medium or a computer network wherein program instructions are sent over optical or electronic communication links. It should be noted that the order of the steps of disclosed processes may be altered within the scope of the invention.

A detailed description of one or more preferred embodiments of the invention is provided below along with accompanying figures that illustrate by way of example the principles of the invention. While the invention is described in connection with such embodiments, it should be understood that the invention is not limited to any embodiment. On the contrary, the scope of the invention is limited only by the appended claims and the invention encompasses numerous alternatives, modifications and equivalents. For the purpose of example, numerous specific details are set forth in the following description in order to provide a thorough understanding of the present invention. The present invention may be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical material that is known in the technical fields related to the invention has not been described in detail so that the present invention is not unnecessarily obscured.

An improved technique for testing email messages is disclosed. A multipronged approach is adopted wherein test methods are applied to incoming messages to classify the messages as spam, not spam, or some other appropriate categories. In this specification, the test methods are processes or techniques that generate information useful for determining whether a message is spam. The test methods attempt to classify the message. The state of the message is updated after each test method is applied.

The classification of the message may be determinate, meaning that the message has reached a state where it will not be further tested, or indeterminate, meaning that the message will be tested further. In some embodiments, a determinate classification is made when a message is classified with reasonable accuracy as either spam or non-spam, and an indeterminate classification is made when a message cannot be accurately classified as spam or non-spam. In some embodiments, a determinate classification is also made when further information and/or resources are needed to classify the message. The measurement of whether the classification is determinant may be a probability value, a confidence level, a score, or any other appropriate metric. An indeterminate classification indicates that the message cannot be classified as either spam or non-spam, although it may still fit under other categories defined by the test method.

If the classification of the message is indeterminate, the message router then chooses an appropriate test method to be applied to the message next, and routes the message to the chosen test method. In some embodiments, to choose the next appropriate test method, the message router analyzes the state and selects the next test method based on the analysis. The testing and routing process may be repeated until the classification of the message is determinate, or until all appropriate test methods have been applied.

FIGS. 1A-1E are block diagrams illustrating the application of test methods to incoming messages. In the embodiment shown in FIG. 1A, the test methods are applied to the incoming messages. The results of the test methods have three message categories: “non-spam,” “spam” and “possibly spam.” Both “non-spam” and “spam” lead to a determinate classification for the message. “Possibly spam” indicate that the classification is indeterminate and that further testing is necessary.

The embodiment shown in FIG. 1B employs many different test methods, including rules, thumbprints, whitelist, address verification, and challenges. The results of the test methods include five message categories: “non-spam” and “spam” that indicate determinate classification, plus “probably spam”, “probably not spam” and “no judgment” that indicate indeterminate classification.

The test methods, the results of the test methods, the number of test methods and the number of results may vary for different embodiments. A variety of test methods may be used. In some embodiments, the test methods include using distinguishing properties as disclosed in U.S. patent application Ser. No. 10/371,987 filed Feb. 20, 2003, which is incorporated by reference for all purposes; and using summary information as disclosed in U.S. patent application Ser. No. 10/371,977 filed Feb. 20, 2003, which is incorporated by reference for all purposes.

In some embodiments, different test methods may have different results. FIG. 1C illustrates an embodiment in which three test methods, whitelist, rules, and challenge are used in testing. The test methods produce different results. The whitelist test method divides the incoming messages into two different categories: “non-spam” for messages that come from allowable senders, and “address questionable” for messages whose sender addresses are not included in the allowable whitelist of senders.

The rules test method classifies the incoming messages into five different categories: “non-spam” and “spam” for messages that can be accurately classified according to the rules; “probably spam” for messages that are likely to be spam according to the rules but cannot be accurately classified; “probably not spam” for messages that are likely to be non-spam; and “no judgment” for messages that are equally likely to be spam or non-spam.

A test method may have different test results in different embodiments. In FIG. 1D, a message is processed by a challenge test. Once a challenge is issued, the message is held by the message router and is not further processed until a response is received. Upon receiving the response, the test method examines the response, and determines whether the message is spam or non-spam accordingly.

In FIG. 1E, the results of the challenge test have three categories that are all determinate: “spam”, “non-spam”, and “challenged”. Once a challenge is issued by the test, the original message is not further tested and thus the result is “challenged”. In some embodiments, the original message is deleted from the router. The test requires more information and/or resource to answer the challenge. In some embodiments, some information pertaining to the challenge is sent back in the response, and in some embodiments, some resources are required by the challenge. Details of the challenge technique are described in U.S. patent application Ser. No. 10/387,352, filed Mar. 11, 2003, which is herein incorporated by reference for all purposes. When a response arrives, the test examines the response, determines whether the original message is spam or not. In some embodiments, the original message is forwarded on to the intended recipient of the message. In embodiments where the original message is deleted, the response message usually includes the original message text, and is usually processed and forwarded.

In some embodiments, each message has a state associated with it. The state is stored in a state data structure, implemented in either software or hardware, used to track state information pertaining to the message and the test methods, including test results, test sequence, probability of the message being spam, etc. After a test method is applied to the message, the state is updated accordingly. In some embodiments, a message router uses the state to determine which test method should be applied to the message next.

FIG. 2 is a system diagram illustrating the operations of a system embodiment. Interface 201 receives the message and forwards it to message router 200 to be routed to various testing modules as appropriate. The interface may be implemented in software, hardware, or a combination. Various test method modules, including rules module 202, challenges module 204, thumbprints module 206, whitelist module 208, and address verification module 210, are used in testing. Message router 200 communicates with the test method modules, evaluates the current state of the message, which comprises its test results up to a given point in time, and determines an appropriate classification and further tests to be run, if appropriate.

After a message is tested by a module, its state is updated based on the test results. If the test results indicate a determinate classification, the message is delivered if it is non-spam, discarded or stored in a special junk folder if it is spam. If the test indicates an indeterminate classification, the message is passed to the message router, which analyzes the state and selects the next test method based on the analysis. In some embodiments, the message router chooses the most distinguishing test method that will most likely result in a determinate classification. In some embodiments, the message router chooses a cheapest test method that consumes the least amount of resources.

FIG. 3 is a diagram illustrating how a message state data structure is used in an embodiment. This message state data structure keeps track of the tests that have been run, the test results of each test method, and an overall score after each test on a scale of 1-10 for scoring how likely the message is spam. It should be noted that in some embodiments, the current overall score is kept and the history overall scores is not tracked. The higher the score, the more likely the message is spam. The parameters in the data structure and their organization are implementation dependent and may vary in other embodiments.

The state is available to both the test methods and the message router. After each test, if no determinate classification is made, the state is analyzed and the most distinguishing test method is chosen as the subsequent test method. The most distinguishing test method is a test method that will most likely produce a determinate classification, based on the current state of the message.

In the embodiment shown, a whitelist test is initially applied to the message. The results indicate that no determinate classification can be made, and thus a rules test is chosen next. The process is repeated until the challenge test is able to reach a determinate classification and classify the message as spam or not spam. After each test, the overall score is adjusted to incorporate the new test results and the state is updated. It should be noted that the state information is cumulative; in other words, the previous state affects the choice of the subsequent test, and thus also influences the next state. In some embodiments, some of the parameters in the current state are summations of previous states; in some embodiments, the parameters in previous states are weighed to calculate the parameters in the current state.

Different messages are likely to produce different test results and different states, thus, the message router may choose different test sequences for different messages. While the test sequence shown in FIG. 3 is whitelist-rules-thumbprints address verification-challenge, another message may have a different test sequence. For example, after whitelist and rules test, the state of the other message may indicate that a challenge test is the most distinguishing test that will most likely determine whether the message is spam. Thus, the other message has a test sequence of whitelist-rules-challenge. A determinate classification can be reached without having to apply all the tests to the message, therefore increasing the efficiency and accuracy of the system.

FIG. 4 is a flowchart illustrating the processing of a message. Once a message is received (400), the processing enters an initial state (402). A test is then performed on the message (404), and the message is classified based on the test results (406). It is then decided whether the test results indicate a determinate classification (408). If a determinate classification is reached, the message is determinatively classified as either spam or non-spam to be processed accordingly (414). If, however, the classification is indeterminate, then the state is updated (410). It is then determined whether there are available tests that have not been used (411). If all the tests have been performed and there are no more tests available, then the message is processed based on test results obtained so far (414). Generally, the message is treated as non-spam and delivered to the intended recipient. If there are more tests available, the next test is chosen (412). The message is then routed to the next test (416), and control is transferred to the performing test step (404) and the process repeats.

The criteria for choosing the subsequent test are implementation dependent. In some embodiments, the message router chooses the most distinguishing test to maximize its chance of reaching a determinate classification; in some embodiments, the message router chooses the cheapest test to minimize resource consumption. Both the cost of each available test and the likelihood of the test discriminating between spam and nonspam may be considered to select the most efficient test. In some embodiments, the next test is selected based on a lookup table that returns the next test based on the tests already taken and the overall score achieved so far. A more complex lookup table may also be used that selects the next test based on the results of specific tests. The decision may also be made adaptively, based on tests that have been determinative in the past for the user. In some embodiments, the results of the tests are input into a statistical classifier, such as a neural network, that is trained based on past data to learn the optimal test selections. User preferences may also be used to select a test that is particularly effective for detecting certain types of spam that are particularly undesirable for the user, or the user may select preferred tests.

FIG. 5 is a flowchart illustrating a test selection process according to one embodiment. It shows details of step 412 in FIG. 4. Once it is decided that more tests are available (411), it is determined whether the state indicates a most distinguishing test among the remaining tests (500). If a most distinguishing test exists, then the test is selected (502) and the message is sent to the selected test by the router (506). If, however, a most distinguishing test does not exist, then the subsequent test is selected based on resource cost (504). Generally, the cheapest test that incurs the least amount of resource cost is selected.

FIGS. 6A-6B illustrate a test selection process based on test results, according to one embodiment. FIG. 6A is a table showing a plurality of test methods and their associated parameters. The test methods are sorted according to their resource consumption, where 1 indicates the least amount of resource consumed and 4 indicates the most. The possible results for the test methods are also shown, and are enumerated as the follows: no judgment=1; probably spam=2; probably not spam=3; spam=4; non-spam=5. The maximum result available to each of the test methods is also shown. It should be noted that the values in the table may be different for other embodiments.

FIG. 6B is a flowchart illustrating a test selection process that utilizes the table shown in FIG. 6A. Once it is decided that more tests are available (411), a candidate test method that consumes the least amount of resource is located according to the table (600). The current result stored in the state of the message is compared with the maximum result of the candidate test method. It is determined whether the current result is less than the maximum result of the candidate test method. In some embodiments, the current result is the result obtained from a previous test. If the current result is less than the maximum result of the candidate test method, the candidate test method is selected (604) and applied to the message (416). If, however, the current result is not less than the maximum result of the candidate test method, the candidate test method is not selected and control is returned to step 411 to repeat the process.

An improved technique for testing email messages has been disclosed. A multipronged approach is adopted wherein a plurality of test methods are made available to help classify a message as spam or not spam. The system keeps track of a state associated with a message and its test results from various test methods. A message router uses the state to route the message among the test methods, until a determinate classification is reached. Since the test sequence is selected intelligently, it is more efficient, more accurate, and consumes fewer resources.

Although the foregoing invention has been described in some detail for purposes of clarity of understanding, it will be apparent that certain changes and modifications may be practiced within the scope of the appended claims. It should be noted that there are many alternative ways of implementing both the process and apparatus of the present invention. Accordingly, the present embodiments are to be considered as illustrative and not restrictive, and the invention is not to be limited to the details given herein, but may be modified within the scope and equivalents of the appended claims. 

What is claimed is:
 1. A method for routing a message through a plurality of test methods, the method comprising: receiving a message at a network interface via a communication network; and executing instructions stored in memory, wherein execution of the instructions by a processor: applies a first test method to the received message, wherein application of the first test method results in an indeterminate classification of the received message, selects one or more next test methods from a plurality of next test methods until all next test methods have been selected or until a determinate classification of the received message results from application of a next test method, the one or more next test methods selected for application to the received message, wherein a next test method more likely to result in a determinate classification is selected over a next test method less likely to result in a determinate classification, and providing the received message for delivery to a user when all next test methods have been selected for application to the received message and application of the next test methods results in an indeterminate classification of the received message. 